import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from "path";
import vueJsx from "@vitejs/plugin-vue-jsx"; // 配置vue使用jsx

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue(),vueJsx()],
  server: {
    port: 8086,
    proxy: {
      '/api': '',
    }
  },
  resolve: {
    alias: {
      '@': path.resolve(__dirname, "src")
    }
  },
  //配置全局共享less
  css: {
    preprocessorOptions: {
      less: {
        charset: false,
        additionalData: '@import "@/assets/styles/global.less";'
      },
    },
  },

})
